laravel 6 orderby

29

// Make sure column names are correct
$inquiries = Inquiry::orderBy('status', 'ASC')
    ->orderBy('created_at', 'DESC')
    ->get();

$inquiries = Inquiry::all()->sortByDesc('created_at')->sortByDesc('Status')->values();

Comments

Submit
0 Comments